﻿using System;
using Lypshare.Net;

namespace Lypshare.Flow
{
	/// <summary>
	/// Raw data event arguments.
	/// </summary>
	/// <exception cref='ArgumentNullException'>
	/// Is thrown when an argument passed to a method is invalid because it is <see langword="null" /> .
	/// </exception>
    public class RawDataEventArgs : DataEventArgs
    {
        // --------------------------------------------------------
        // Class Properties
        // --------------------------------------------------------


        /// <summary>
        /// Gets or sets the endpoint.
        /// </summary>
        /// <value>
        /// The endpoint.
        /// </value>
        public FlowEndPoint Endpoint 
        { 
            get; 
            private set; 
        
        } // Property: Endpoint


        // --------------------------------------------------------
        // Class Functions
        // --------------------------------------------------------


        /// <summary>
        /// Initializes a new instance of the <see cref="Lypshare.Flow.RawDataEventArgs"/> class.
        /// </summary>
        /// <param name='endpoint'>
        /// Endpoint.
        /// </param>
        /// <param name='packet'>
        /// Packet.
        /// </param>
        /// <exception cref='ArgumentNullException'>
        /// Is thrown when an argument passed to a method is invalid because it is <see langword="null" /> .
        /// </exception>
        public RawDataEventArgs(FlowEndPoint endpoint, Packet packet)
            :base(packet)
        {
            if (endpoint == null)
                throw new ArgumentNullException("endpoint");

            this.Endpoint = endpoint;

        } // Constructor

    } // class RawDataEventArgs
} // namespace Lypshare.Flow